The present invention relates generally to audio encoding and decoding, and in particular, to a method and apparatus for encoding and decoding audio signals to emphasize and discriminate select sounds.
The advantages of processing audio signals digitally are known. In many applications compression is used when processing audio signals digitally to accommodate the bandwidth requirements of a communications channel or the storage limitations of a system. Compression is accomplished by numerous means that reduce the amount of data required to reproduce a sound. In general, an encoder exploits redundancy or some negligible perception quality to reduce the amount of digital data needed to reproduce an audio signal. A decoder reverses the encoding process to reproduce the audio signal.
In a system using compressed audio, unwanted background noise is a problem. In particular, since some information is generally lost in the compression process, noise may make an audio signal incomprehensible or otherwise undesirable after compression. Filtering techniques are employed to reduce noise, but these techniques generally filter based on frequency and signal level thresholds. Frequency based filtering is inadequate where the noise is at or near the sound level and frequency of the audio signal of interest.
In many applications a specific audio signal or class of signals must be perceived. For example, the sound of coins dropping in a payphone needs to be distinguished from background noise. Surveillance systems may need to monitor a particular sound related to an event under surveillance. Certain speech may need to be distinguished from background noise. Conventional compression techniques and filtering do not provide an adequate means to distinguish or emphasize a particular sound among other sounds.
Therefore, a need exists for a method and apparatus to distinguish or emphasize a specific audio signal or class of audio signals.
In accordance with the present invention, a specific sound is discriminated or distinguished within an audio encoder or decoder. This is accomplished by referring to a code table storing a plurality of audio samples representing the specific sound to be discriminated.
In one aspect of the present invention, an apparatus for encoding audio signals employs techniques to discriminate a specific sound. The apparatus includes an analog-to-digital converter that converts an audio signal to a stream of digital audio samples. An encoder receives the stream of digital audio samples and encodes the samples to produce an encoded stream of audio samples. After encoding, a comparator compares a predetermined number of samples from the encoded stream of audio samples with a predetermined number of samples from a code table. The code table stores audio samples relating to a specific audio signal to be discriminated. The comparator locates the audio samples in the code table that are closest to the predetermined number of samples from the encoded stream of audio samples and a discriminator determines whether it is more favorable to use the encoded audio samples or the samples from the code table. This determination selects a discriminated group of samples. In variations of the invention the comparator and discriminator precede the encoder or the comparator and discriminator are coupled between two encoders. Multiple code tables are provided relating to different specific sounds. The code tables are selectable by a user of the apparatus.
In another aspect of the present invention an apparatus for decoding audio signals employs techniques to discriminate a specific sound. The apparatus includes a decoder that receives and decodes an encoded stream of audio to produce a stream of decoded audio samples. A comparator compares a predetermined number of decoded audio samples from the stream of decoded audio samples to a predetermined number of samples in a code table. The comparator locates the audio samples in the code table that are closest to the predetermined number of decoded audio samples and determines a difference between the selected samples from the code table and the predetermined number of decoded audio samples. A discriminator uses the difference to select either the decoded audio samples or the samples from the code table as discriminated samples. The discriminate samples are received by a digital-to-analog converter that renders the discriminated samples into an audio signal. In variations of the invention the comparator and discriminator precede the decoder or the comparator and discriminator are coupled between two decoders. Also, multiple code tables are provided relating to different specific sounds and the code tables are selectable by a user of the apparatus.
Code tables storing audio samples of desired sounds to be discriminated are created by receiving a desired sound to be discriminated. The desired sound is preferably mixed with noise, including random or predetermined noise, to produce a mixed input signal. The mixed input signal is digitized to produce a digitized input signal. A filter with adjustable parameters is used to filter the digitized input signal to produce a plurality of audio samples that are stored. The plurality of audio samples are converted to an audio signal that is compared with the desired sound. If the audio signal is acceptable, the plurality of audio samples are stored as a code table for the desired sound. If the audio signal is not acceptable, the process is repeated employing different filter parameters until the audio signal produced is acceptable. The plurality of audio samples relating to the acceptable audio signal are stored as code table entries for discriminating the desired sound.